<template>
  <div>
    <el-form :model="rfiData" style="margin:10px">
      <el-row>
        <el-col :span="4">
          <div class="col_label">采购组织</div>
        </el-col>
        <el-col :span="4">
          <div  class="col_view">{{rfiData.purOrgName}}</div>
        </el-col>
        <el-col :span="4">
          <div class="col_label">采购组</div>
        </el-col>
        <el-col :span="4">
          <div  class="col_view">{{rfiData.purGroupName}}</div>
        </el-col>
        <el-col :span="4">
          <div class="col_label">RFI类型</div>
        </el-col>
        <el-col :span="4">
          <div  class="col_view">{{rfiData.infoType == 'rfi2' ? '产品认证' : '调查问卷'}}</div>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="4">
          <div class="col_label">反馈截止日期</div>
        </el-col>
        <el-col :span="4">
          <div  class="col_view">{{rfiData.endTime}}</div>
        </el-col>
        <el-col :span="4">
          <div class="col_label">标题</div>
        </el-col>
        <el-col :span="12">
          <div  class="col_view">{{rfiData.title}}</div>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="4" class="col_label">附件</el-col>
        <el-col :span="20" class="col_view">
          <a href="javascript:;" @click="downloadFiles(rfiData.attFileUrl,rfiData.attFileName)" class="download_color">{{rfiData.attFileName}}</a>
        </el-col>
      </el-row> 
      <el-row>
        <el-col :span="4">
          <div class="col_label">内容</div>
        </el-col>
        <el-col :span="20">
          <div class="col_view">{{rfiData.description}}</div>
        </el-col>
      </el-row>
    </el-form>
  </div>
</template>
<script>
  import qs from 'qs';
  export default {
    data() {
      return {
        formLabelWidth:'120px',
        // 默认隐藏弹出框
        dialogFormVisible: false,
        // npc打样任务数据对象
        rfiData:{

        }
      };
    },
    mounted() {
       this.getRfiDetail();
    },
    methods: {
      // 获取打样信息
      getRfiDetail() {
       this.axios.post(this.lib.config.host.vendorMgt + "/vendormgt/vsp/rfi/getById/" + this.$route.query.rfiId)
          .then((response)=>{
            this.rfiData = response.data;
          })
          .catch((error)=>{
            console.log(error);
          });
      },
      downloadFiles(filePath,fileName){
         this.downloadFile(filePath, fileName);
      }
    }
  }
</script>
